﻿Imports Mysoft.Map.LMS
Partial Public Class LogCollectDisposetest
    Inherits System.Web.UI.Page

    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

    End Sub

    Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
        Dim ip As String = Request.UserHostAddress
        Dim startDate As DateTime

        startDate = Convert.ToDateTime(startDate1.Text.Trim())
        Dim endDate As DateTime
        endDate = Convert.ToDateTime(endDate1.Text.Trim())

        Dim iISLog As Boolean = iISLog1.Checked
        Dim windowsLog As Boolean = windowsLog1.Checked
        Dim erpExceptionLog As Boolean = erpExceptionLog1.Checked
        Dim erpVisitLog As Boolean = erpVisitLog1.Checked
        Dim erpUserQuantity As Boolean = erpUserQuantity1.Checked
        Dim erpDBSpaceInfo As Boolean = erpDBSpaceInfo1.Checked
        Dim erpDBIndexInfo As Boolean = erpDBIndexInfo1.Checked
        Dim serverInfo As Boolean = serverInfo1.Checked

        Dim windowsLogSource As String = windowsLogSource1.Text.Trim()

        If (startDate <> DateTime.MinValue And endDate <> DateTime.MinValue) Then
            Dim collectFacde As CollectFacde = New CollectFacde()
            CollectFacde.CollectDispose(ip, startDate, endDate, iISLog, windowsLog, erpExceptionLog, erpVisitLog, erpUserQuantity, erpDBSpaceInfo, erpDBIndexInfo, serverInfo, windowsLogSource)
        End If

    End Sub

    Protected Sub Button2_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button2.Click
        Dim startDate1 As String = HttpUtility.UrlEncode(startDateUrl.Text.Trim())
        Dim endDate1 As String = HttpUtility.UrlEncode(endDateUrl.Text.Trim())
        Dim userName1 As String = HttpUtility.UrlEncode(userName.Text.Trim())
        Dim password1 As String = HttpUtility.UrlEncode(MySoft.Map.Security.Cryptography.EnCode(password.Text.Trim()))
        Dim customerName1 As String = HttpUtility.UrlEncode(customerName.Text.Trim())
        Dim productName1 As String = HttpUtility.UrlEncode(productName.Text.Trim())

        generateUrl.Text = String.Format(url.Text + "?StartDate={0}&EndDate={1}&UserName={2}&Password={3}&CustomerName={4}&ProductName={5}", startDate1, endDate1, userName1, password1, customerName1, productName1)
    End Sub
End Class